#include <iostream>
using namespace std;
class person
{
public:
    int age;

public:
};

// 全局运算符重载
bool operator==(person const &p1, person const &p2)
//满足要求，做操作数的类型被显示指定
{
    if (p1.age == p2.age)
        return true;
    return false;
}
int main()
{
    person rose;
    person jack;
    rose.age = 18;
    jack.age = 23;
    if (rose == jack)
    {
        cout << "ok" << endl;
    }
    return 0;
}
